import request from '@/utils/request'

/**
 *  登录
 *  @param email
 *  @param password
 */
export const userloginService = ({ email, password }) => {
  return request({
    url: '/login',
    method: 'POST',
    data: {
      email,
      password
    }
  })
}

/**
 *  注册
 *  @param email
 *  @param password
 */
export const userregisterService = ({ email, password, code }) => {
  return request({
    url: '/register',
    method: 'POST',
    data: {
      email,
      password,
      code
    }
  })
}

/**
 * 验证码登录
 * @param email
 * @param code
 */
export const userloginCodeService = ({ email, code }) => {
  return request({
    url: '/login/verify-code',
    method: 'POST',
    data: {
      email,
      code
    }
  })
}